import request from "@/api";
import { PageQuery, PageRet } from "../../response";

class ExceptionLogApi {
  /**
   * 查询
   * @param data
   * @returns
   */
  static async query(data: ExceptionLogQuery): Promise<PageRet<ExceptionLogModel>> {
    return await request({
      url: "/exceptionLog/query",
      method: "post",
      data: data,
    });
  }
}

export default ExceptionLogApi;

export interface ExceptionLogModel {
  createTime?: string;
  createBy?: string;
  method?: string;
  requestUrl?: string;
  requestParameters?: string;
  requestIp?: string;
  ipAddress?: string;
  operatingSystem?: string;
  deviceType?: string;
  browserName?: string;
  version?: string;
  exceptionMessage?: string;
  exceptionInner?: string;
  exceptionStack?: string;
}

export interface ExceptionLogQuery extends PageQuery {
  searchString?: string;
}
